Fake
A Rust library for generating fake data.
Installation
Default:
[]
= { = "2.10.0", = ["derive"] }
Available features:
derive
: if you want to use#[derive(Dummy)]
- supported crates feature flags:
chrono
chrono-tz
http
uuid
bigdecimal
(viabigdecimal-rs
)rust_decimal
random_color
geo
semver
serde_json
time
zerocopy
glam
url
always-true-rng
: expose AlwaysTrueRngmaybe-non-empty-collections
: allow to use AlwaysTrueRng to generate non-empty collections
Usage
use ;
use StdRng;
use SeedableRng;
Fakers with locale
Lorem
Word;
Words;
Sentence;
Sentences;
Paragraph;
Paragraphs;
Name
FirstName;
LastName;
Title;
Suffix;
Name;
NameWithTitle;
Number
Digit;
;
Boolean
Boolean;
Internet
FreeEmailProvider;
DomainSuffix;
FreeEmail;
SafeEmail;
Username;
Password;
IPv4;
IPv6;
IP;
MACAddress;
UserAgent;
HTTP
RfcStatusCode;
ValidStatusCode;
Color
HexColor;
RgbColor;
RgbaColor;
HslColor;
HslaColor;
Color;
Company
CompanySuffix;
CompanyName;
Buzzword;
BuzzwordMiddle;
BuzzwordTail;
CatchPhrase;
BsVerb;
BsAdj;
BsNoun;
Bs;
Profession;
Industry;
Address
CityPrefix;
CitySuffix;
CityName;
CountryName;
CountryCode;
StreetSuffix;
StreetName;
TimeZone;
StateName;
StateAbbr;
SecondaryAddressType;
SecondaryAddress;
ZipCode;
PostCode;
BuildingNumber;
Latitude;
Longitude;
Geohash;
Automotive
LicencePlate;
Barcode
Isbn;
Isbn13;
Isbn10;
Phone Number
PhoneNumber;
CellNumber;
Date/Time
Time;
Date;
DateTime;
Duration;
DateTimeBefore;
DateTimeAfter;
DateTimeBetween;
Filesystem
FilePath;
FileName;
FileExtension;
DirPath;
Finance
Bic;
UUID
UUIDv1;
UUIDv3;
UUIDv4;
UUIDv5;
LICENSE
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.